package cn.liuhuan1.api;

import cn.liuhuan1.webModelBean.vo.ArticleCommentVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther: liuhuan
 * @Date: 2021/4/19 - 04 - 19 - 19:58
 * @Description:
 * @version: 1.0
 */
@FeignClient("service-mongo")
public interface MongoDbClent {

    @RequestMapping(value = "/mongoDb/insert",method = RequestMethod.POST)
    public void insert(@RequestBody ArticleCommentVo articleCommentVo);

    @RequestMapping(value = "/mongoDb/insertList",method = RequestMethod.POST)
    public void insertList(@RequestBody List<ArticleCommentVo> articleCommentVoList);

    @RequestMapping(value = "/mongoDb/findAll",method = RequestMethod.GET)
    public List<ArticleCommentVo> findAll(@RequestParam("articleId") String articleId);

    @RequestMapping(value = "/likeNumber",method = RequestMethod.POST)
    public void likeNumber(@RequestParam("id") String id,@RequestParam("likeNumber") Integer likeNumber);
}
